package com.farewell.hotel.service.impl;

import com.farewell.hotel.entity.InfoSearch;
import com.farewell.hotel.mapper.OrderMapper;
import com.farewell.hotel.pojo.Order;
import com.farewell.hotel.service.OrderService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Farewell
 * @date 2021/4/23
 */
@Service("OrderService")
public class OrderServiceImpl implements OrderService {
    @Autowired
    private OrderMapper orderMapper;


    @Override
    public void deleteOrderById(Long id) {
        orderMapper.deleteOrderById(id);
    }

    @Override
    public List<Order> findCost(InfoSearch orderInfoSearch) {
        return orderMapper.findCost(orderInfoSearch);
    }

    @Override
    public void addOrder(Order order) {
        orderMapper.addOrder(order);
    }

    @Override
    public Order findOutRoomInfoByRoomId(Long roomId) {
        return orderMapper.findOutRoomInfoByRoomId(roomId);
    }
}
